import { ProFormDigit, ProFormGroup, ProFormSwitch, ProFormText } from '@ant-design/pro-form';

export const formChidren = () => {

  return (
    <>
      <ProFormText
        name='name'
        label='环境名称'
        rules={[
          { required: true, message: '请填写环境名称' },
        ]}
      />
      <ProFormGroup>
        <ProFormDigit
          label='CPU(核)'
          name='max_cpu'
          width='sm'
          min={1}
          rules={[
            { required: true, message: '请填入CPU' },
          ]}
        />

        <ProFormDigit
          label='内存(G)'
          name='max_memory'
          width='sm'
          min={1}
          rules={[
            { required: true, message: '请填入内存' },
          ]}
        />

        <ProFormDigit
          label='硬盘(G)'
          name='max_disk'
          width='sm'
          min={1}
          rules={[
            { required: true, message: '请填入硬盘' },
          ]}
        />
      </ProFormGroup>
      <ProFormSwitch fieldProps={{ defaultChecked: true }} name='status' label='启用' />
    </>
  );
};
